package weka;

import weka.classifiers.Classifier;
import weka.classifiers.Evaluation;

public class InterfaceReturnValue {
	
	// eror recording
	private boolean m_had_error = false;
	private String m_error_description = null;

	// classifier recording
	private Classifier  m_classifier = null;	
	private String[]  m_targetClassLabels = null;
	
	//performance
	private double m_accuracy = -2.0;
	private double m_error_rate = -2.0;
	private Evaluation m_eval = null;
	private double[][] m_confusion_matrix = null;
	
	public Classifier getClassifier() {
		return m_classifier;
	}
	public void setClassifier(Classifier m_classifier) {
		this.m_classifier = m_classifier;
	}
	public double getAccuracy() {
		return m_accuracy;
	}
	public void setAccuracy(double m_accuracy) {
		this.m_accuracy = m_accuracy;
	}
	public double getErrorRate() {
		return m_error_rate;
	}
	public void setErrorRate(double m_error_rate) {
		this.m_error_rate = m_error_rate;
	}
	public boolean hadError() {
		return m_had_error;
	}
	public void setHadError(boolean m_had_error) {
		this.m_had_error = m_had_error;
	}
	public String getErrorDescription() {
		return m_error_description;
	}
	public void setErrorDescription(String m_error_description) {
		if(this.m_error_description == null){
		this.m_error_description = m_error_description;
		}else{
			this.m_error_description += "\n" + m_error_description;
		}
	}
	public Evaluation getEvaluation() {
		return m_eval;
	}
	public void setEvaluation(Evaluation m_eval) {
		this.m_eval = m_eval;
	}
	public double[][] getConfusionMatrix() {
		return m_confusion_matrix;
	}
	public void setConfusionMatrix(double[][] m_confusion_matrix) {
		this.m_confusion_matrix = m_confusion_matrix;
	}
	public String[] getTargetClassLabels() {
		return m_targetClassLabels;
	}
	public void setTargetClassLabels(String[] m_targetClassLabels) {
		this.m_targetClassLabels = m_targetClassLabels;
	}
	
}
